package 多线程和队列.淺拷貝深拷貝;

/**
 * @author Amos  2022/12/4
 */
public class Student implements Cloneable{
    private String name;
    private int age;
    private Person person;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public Person getPerson() {
        return person;
    }
    public void setPerson(Person person) {
        this.person = person;
    }
    @Override
    public String toString() {
        return "Student{" +
                this.hashCode()+
                "name='" + name + '\'' +
                ", age=" + age +
                ", person=" + person +
                '}';
    }
    @Override
    protected Object clone(){
        try {
            return super.clone();
        } catch (CloneNotSupportedException
                e) {
            e.printStackTrace();
            return null;
        }
    }
}
